package jxc.servlet.info.provider;

import java.io.IOException;
import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import jxc.data.hibernate.dao.ProviderDAO;

/**
 * Servlet implementation class Update
 */
@WebServlet(name = "ListProvider", urlPatterns = { "/info/provider/list" })
public class List extends HttpServlet {
	private static final long serialVersionUID = 1L;
       

	/**
	 * 返回全部供货商
	 */
	protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
		ProviderDAO pDao=new ProviderDAO();
		request.setAttribute("list", pDao.getAll());
		request.getRequestDispatcher("/info/provider/list.jsp").forward(request, response);
	}


}
